home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / pa / lib2funcs.asm next >
Assembly Source File  |  1995-06-15  |  2KB  |  48 lines

  1. ;  Subroutines for calling unbound dynamic functions from within GDB for HPPA.
  2. ;  Copyright (C) 1994 Free Software Foundation, Inc.
  3.  
  4. ;  This file is part of GNU CC.
  5.  
  6. ;  GNU CC is free software; you can redistribute it and/or modify
  7. ;  it under the terms of the GNU General Public License as published by
  8. ;  the Free Software Foundation; either version 2, or (at your option)
  9. ;  any later version.
  10.  
  11. ;  GNU CC is distributed in the hope that it will be useful,
  12. ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ;  GNU General Public License for more details.
  15.  
  16. ;  You should have received a copy of the GNU General Public License
  17. ;  along with GNU CC; see the file COPYING.  If not, write to
  18. ;  the Free Software Foundation, 59 Temple Place - Suite 330,
  19. ;  Boston, MA 02111-1307, USA.
  20.  
  21.     .SPACE $PRIVATE$
  22.     .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
  23.     .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
  24.     .SPACE $TEXT$
  25.     .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
  26.     .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
  27.     .IMPORT $$dyncall,MILLICODE
  28. ; gcc_compiled.:
  29.     .SPACE $TEXT$
  30.     .SUBSPA $CODE$
  31.  
  32. ; Simply call with the address of the desired import stub in %r22 and
  33. ; arguments in the normal place (%r26-%r23 and stack slots).
  34. ;
  35.     .align 4
  36.     .EXPORT __gcc_plt_call,ENTRY,PRIV_LEV=3,RTNVAL=GR
  37. __gcc_plt_call
  38.     .PROC
  39.     .CALLINFO FRAME=64,CALLS,SAVE_RP
  40.     .ENTRY
  41.     stw %r2,-8(0,%r30)
  42.     bl $$dyncall,%r31
  43.     copy %r31,%r2
  44.     ldw -8(0,%r30),%r2
  45.     bv,n 0(%r2)
  46.     .EXIT
  47.     .PROCEND
  48.